wg: make [$HOST]:$PORT notation for an endpoint imply AF_INET6.#31
wg: make [$HOST]:$PORT notation for an endpoint imply AF_INET6.#31klihub wants to merge 1 commit intoWireGuard:masterfrom
Conversation
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
|
Will this have weird interactions with [hostname] resolving to ipv6 when the [] notion is actually meant for IP addresses only? |
@zx2c4 Sorry, for not stating the intent of the PR clearly in the original description. So that is exactly my intent with this PR. To allow forcing hostname to be resolved to an IPv6 address if the used endpoint notation is The syntax is already allowed/there, it just does not have any effect when a hostname is used. And I haven't found an existing way in the current implementation to force wg to pick and IPv6 address in the case of an IPv4/IPv6 multihomed host. |
|
Exploiting the fact that, counterintuitively, something that's not a plain @zx2c4 Please consider my 2023 patch introducing PS: Hi Jason, good to see you're still alive ;-). I was bummed I didn't find you at FOSDEM this year :0. |
parse_endpoint()for wg lets users specify an endpoint using a[$HOSTNAME]:$PORTnotation. However, it has no effect on the address family chosen for hostname resolution. Updateparse_endpointto pass anAF_INET6hint togetaddrinfowhen such a notation is used which allows users to force selecting an IPv6 address.